Skip to content

feat(watchdog): rung-2 wedge probe — page renderer responsiveness (#10630) - #13015

Merged
dezren39 merged 1 commit into
mainfrom
lane-jq-10630
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-jq-10630

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

What

The code-owned CDP wedge probe for #10630, named as next slice (1) in Lane GF's landed record on PR #12965: a CDP-level check that the target page is responsive, not just that the port is listening — plus restart-and-revalidate on wedge.

The gap

Rung 2 (the repair rung for browser-down / cdp-unreachable) validated a session using only browser-level signals: /json/version, /json/list, and Storage.getCookies over the browser websocket. A hung page renderer answers all three, so a wedged browser passed re-validation as "succeeded" while every scrape kept failing — the silent shape of the 2026-11-13→16 outage.

Change (pm-stack/exporters/src/watchdog.ts)

  • cdpPageResponsive(wsUrl, timeoutMs) — sends a trivial Runtime.evaluate over the page target's own debugger websocket and bounds the wait. The reply value is discarded; answering at all is the signal. Error replies, dead endpoints, and silence all read unresponsive with a named detail; nothing throws.
  • pickAllowlistTarget(targets, origins) — pure choice of the page-type allowlist target carrying a debugger websocket. Background pages, workers, and off-origin pages never count as "the page is open"; an allowlist page with no debugger websocket is now an honest failure ("cannot probe it") instead of a silent pass.
  • Rung 2 validates in layers: page open → renderer answers → cookies present by name. A wedge triggers the same bounded supervised restart as a dead endpoint, followed by the full validation again — a restart that leaves the page hung is a failure, not a repair. Recovery is only real when a later tick observes a fresh producer read; that stays the recovery path's claim (fix(watchdog): preserve handoff disposition on recovery #12293), not this rung's.

Verification

  • New test/watchdog-wedge.test.ts (8 tests): a wire oracle — a fake CDP page websocket that answers / never replies (hung-renderer shape) / replies with a CDP error / is a dead endpoint — and a target-choice oracle for pickAllowlistTarget.
  • All four watchdog suites on the laptop worktree: 54 pass / 0 fail (46 pre-existing + 8 new).

Scope honesty

Refs #10630 — the issue stays open. Remaining there: the Mistral gatherer failure classification (session-expired vs cdp-unavailable, etc.), which is OpenChamber-side per the 2026-11-22 decision, not this repo.


See it in action
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

#10630)

Rung 2 re-validated a CDP session using only browser-level signals:
/json/version, /json/list, and Storage.getCookies over the browser
websocket. A hung page renderer answers all three, so a wedged
browser passed re-validation while every scrape kept failing — the
silent shape of the 2026-11-13→16 outage.

- cdpPageResponsive: sends a trivial Runtime.evaluate over the page
  target's own debugger websocket and bounds the wait; answering at
  all is the signal, the value is discarded.
- pickAllowlistTarget: pure choice of the page-type allowlist target
  carrying a debugger websocket (background pages, workers, and
  off-origin pages never count as "the page is open").
- rung 2 now validates in layers (page open -> renderer answers ->
  cookies by name). A wedge triggers the same bounded supervised
  restart as a dead endpoint, followed by the FULL validation again;
  a restart that leaves the page hung is a failure, not a repair.

Tests: new test/watchdog-wedge.test.ts — a wire oracle (fake CDP
page websocket: answers / never replies / CDP error / dead endpoint)
and a target-choice oracle. All four watchdog suites: 54 pass.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 708d1176-2155-4233-a185-d723a61db2d3
Commits

Reviewing files that changed from the base of the PR and between 016078b and d974f6b.

Files selected for processing: 2

  • pm-stack/exporters/src/watchdog.ts
  • pm-stack/exporters/test/watchdog-wedge.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T07:07:02.510760Z d974f6b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit a189f9f into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane-jq-10630 branch November 23, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant